/*
 * @Author: szx
 * @Date: 2022-05-27 14:02:19
 * @LastEditTime: 2022-05-27 14:08:18
 * @Description:
 * @FilePath: \leetcode\面试题\16\01\01.js
 */
/**
 * @param {number[]} numbers
 * @return {number[]}
 */
var swapNumbers = function (numbers) {
    [numbers[0], numbers[1]] = [numbers[1], numbers[0]];
    return numbers;
};

var swapNumbers = function (numbers) {
    numbers[0] = numbers[0] ^ numbers[1];
    numbers[1] = numbers[0] ^ numbers[1];
    numbers[0] = numbers[0] ^ numbers[1];
    return numbers;
};
